package com.nsgf.library.ui.adapter;

import android.content.Context;

import androidx.recyclerview.widget.RecyclerView;

import com.kunminx.binding_recyclerview.adapter.SimpleDataBindingAdapter;
import com.nsgf.library.R;
import com.nsgf.library.data.bean.WaterInfoListBean;
import com.nsgf.library.databinding.ItemNsgfWaterBinding;

/**
 * 水库水位数据适配器
 */
public class ReservoirListAdapter extends SimpleDataBindingAdapter<WaterInfoListBean.ReservoirBean, ItemNsgfWaterBinding> {

    public ReservoirListAdapter(Context context) {
        super(context, R.layout.item_nsgf_water, DiffUtils.getInstance().getReservoirItemCallback());
    }

    @Override
    protected void onBindItem(ItemNsgfWaterBinding binding, WaterInfoListBean.ReservoirBean item, RecyclerView.ViewHolder holder) {
        binding.setVm(item);
    }
}

